Robust approaches for model-free small-angle scattering data analysis

Three different approaches are compared for determination of the correlation function from the small-angle neutron scattering data of a powder sample of iron oxide nanoparticles.

The small-angle neutron scattering data of nanostructured magnetic samples contain information regarding their chemical and magnetic properties. Often, the first step to access characteristic magnetic and structural length scales is a model-free investigation. However, due to measurement uncertainties and a restricted q range, a direct Fourier transform usually fails and results in ambiguous distributions. To circumvent these problems, different methods have been introduced to derive regularized, more stable correlation functions, with the indirect Fourier transform being the most prominent approach. Here, the indirect Fourier transform is compared with the singular value decomposition and an iterative algorithm. These approaches are used to determine the correlation function from magnetic small-angle neutron scattering data of a powder sample of iron oxide nanoparticles; it is shown that with all three methods, in principle, the same correlation function can be derived. Each method has certain advantages and disadvantages, and thus the recommendation is to combine these three approaches to obtain robust results.

Introduction
Small-angle neutron scattering (SANS) probes chemical and magnetic structure on the mesoscale ($1-500 nm) (Jeffries et al., 2021), which makes SANS an ideal tool to investigate nanostructured magnetic materials such as bulk ferromagnets or magnetic nanoparticle systems (Mü hlbauer et al., 2019). In SANS data analysis, it is good practice to perform a Fourier transform to obtain starting parameters for the characteristic magnetic and structural length scales that are relevant for a system (Feigin & Svergun, 1987).
In the case of pure nuclear scattering the extracted correlation function corresponds to the autocorrelation function of the scattering length density profile (Li et al., 2016). This is not the case for magnetic neutron scattering due to the anisotropic nature of the dipole-dipole interaction (Mettus & Michels, 2015). However, the derived correlation functions still contain important information that reflects the real-space magnetization over the mesoscale . Thus, the Fourier transform of reciprocal SANS data is an easy and straightforward approach to obtain model-independent information regarding the chemical and magnetic nanostructure of the sample.
Real experimental data usually have measurement uncertainties and a restricted q range, which can lead to ambiguous correlation functions when performing a direct Fourier transform of the data. To circumvent these issues the indirect Fourier transform (IFT) was introduced in the 1970s (Glatter, 1977). In this case, the correlation function is essentially obtained by a fit of the experimental data using a Tikhonov regularization to force smooth distributions. To find the optimal value for the smoothing degree a Bayesian analysis can be applied (Hansen, 2000). This approach allows for the inclusion of the maximum size of the scattering, which defines the size range for which the correlation function is computed, as fit parameter (Hansen, 2012). Such a model-free analysis of scattering data has proven to be a powerful approach to study several categories of materials, e.g. polymer solutions (Hammouda, 2010), protein conformation (Sanchez-Fernandez et al., 2017) and the structure of colloidal particles (Fritz et al., 2000).
The IFT can further be used to derive the 2D correlation functions from the complete scattering pattern (Fritz-Popovski, 2013). However, this approach is computationally intensive for large data sets. Therefore, two faster numerical approaches were recently introduced to determine the 2D correlation functions from scattering patterns, namely the singular value decomposition (SVD) (Bender et al., 2019) and the iterative Kaczmarz algorithm (KA) .
Here, we analyze 1D scattering data and apply all three model-free approaches, namely the IFT, SVD and KA. We use these methods to determine the correlation functions of a powder sample of magnetic iron oxide nanoparticles from the magnetic-field-dependent SANS intensities measured at the multipurpose neutron spin-echo spectrometer RESEDA in modulation of intensity with zero effort (MIEZE)-SANS mode .

Pre-characterization of the sample
The sample was a dense powder of $200 mg freeze-dried iron oxide nanoparticles. The spherical single-crystalline particles were synthesized by thermal decomposition and had an average diameter of around 10 nm with a very narrow size distribution ( < 0.1). Fig. 1(a) shows a transmission electron microscopy (TEM) image of the nanoparticles.
The macroscopic magnetic properties of the powder at 300 K were determined by quasistatic direct-current magnetometry (DCM) and alternating-current susceptibility (ACS) [see Figs. 1(b) and 1(c)]. The DCM measurement, measured from 6 T ! À6 T ! 6 T, exhibits a Langevin-type magnetization behavior with vanishing coercivity and remanence, indicating a superparamagnetic behavior of the sample. This is verified by the ACS measurement whose imaginary part is close to zero at low frequencies (Ludwig et al., 2017). This means that the magnetic moments of the nanoparticles can freely follow the external magnetic field via Né el-type relaxation. With increasing frequency the imaginary part slightly increases and the real part decreases accordingly. However, within the accessible frequency range (i.e. 10-10 6 Hz) no relaxation peak in the imaginary part is observed, which indicates that the characteristic relaxation times of the particles are significantly below = 1/! = 1/(2f) < 1.6 Â 10 À7 s.

Magnetic SANS measurements
For the SANS measurements the particle powder was placed into a quartz glass cuvette with an optical path length of 1 mm. The scattering patterns were measured with the neutron spin-echo spectrometer RESEDA using the MIEZE-SANS arm . The 2D detector was positioned off-center of the direct neutron beam as shown in    magnet with the field applied in the horizontal plane. From the scattering patterns we determined the sector average in the horizontal direction, i.e. along the magnetic field direction, with a sector width of AE10 . In the following, we use three different approaches to derive the underlying correlation functions from the 1D sector averages.

Data analysis
3.1. Introduction of the three model-free approaches From the 1D scattering intensity shown in Fig. 2, the underlying correlation function PðrÞ was determined by three different approaches. First the IFT was applied. In this case the N-dimensional vector PðrÞ is determined by minimizing the functional 1 2 2 APðrÞ À IðqÞ 2 þ LPðrÞ 2 : Here, ¼ ðqÞ is the standard deviation of each data point and IðqÞ is the measured scattering intensity with M data points. The matrix A in equation (1) is the M Â N data transfer matrix with A i;j ¼ 4f½sinðq i r j Þ=ðq i r j ÞgÁr j . The matrix L is an N Â N regularization matrix, which is multiplied with the regularization parameter . To penalize oscillations within the extracted distributions, the non-singular approximation of the discrete second-order derivative operator can be used for L: For numerical computation, equation (1) is inconvenient and the least-squares solution of is determined, where 0 N;1 is a zero vector of length N. To perform the IFT the size range 0-D max of PðrÞ has to be defined a priori. However, D max can be included as an additional fit parameter. Here, we performed the IFT for a total of 251 D max values (between 10 and 30 nm). Furthermore, we varied over six orders of magnitude (from 10 0 to 10 5 ) and determined for each set of ðD max ; Þ the evidence according to Hansen (2000) and as described in detail by Bender et al. (2017). The D max value for which the highest evidence was found was then used for the SVD and the KA as well.
With the SVD the data transfer matrix A is decomposed according to A ¼ USV T , where U and V are orthogonal N Â N and M Â M matrices, respectively, and S is an N Â M matrix whose main diagonal elements are the singular values s i . The correlation function PðrÞ is then calculated using The diagonal of S þ contains the reciprocal values 1=s i , and all off-diagonal entries of S þ are zero. In the case of ill-posed problems, many of the singular values will be very small which amplifies measurement uncertainties. Thus, using all singular values usually results in large unphysical oscillations in the derived distributions. The singular values of S are usually given in descending order, and thus a smoothing can be accomplished by reducing the number of singular values N s which are considered for the reconstruction (Berkov et al., 2000). Using the KA, PðrÞ is calculated by updating the elements Pðr j Þ after each iteration according to where A i is the ith row of the matrix A, A i is its transpose, k is the iteration number, and one iteration contains a sweep over all rows i. Here we shuffle randomly through all rows A i and normalize the residuals [i.e. Iðq i Þ À A i P k ðr j Þ] to ðq i Þ, similar to a weighted least-squares fit. Fig. 3 shows the results for the IFT. The highest evidence was found for D max = 22 nm. The fit of the data is shown in Fig. 3(a). In Fig. 3(b) the correlation functions for all values are plotted and the corresponding evidences are shown in Fig. 3(c). The PðrÞ with the highest evidence is highlighted in red. The correlation function exhibits one oscillation with the first zero crossing at around 10 nm. This value agrees well with the physical particle size. The oscillations can be attributed to a structure factor due to inter-particle interference    (Fritz-Popovski et al., 2011), which leads to a shift of the zero crossing towards smaller sizes and concerns nuclear and magnetic contributions as discussed at the end of this section. Fig. 4 shows the results for the SVD. As can be seen, by increasing the number of singular values that are considered for the reconstruction of PðrÞ to N s ¼ 6, the total weighted error 2 decreases [ Fig. 4(c)] before leveling out. But for N s > 6, large unphysical oscillations are obtained in the resultant correlation functions PðrÞ, as shown in Fig. 4(b). The PðrÞ determined for N s ¼ 6 is highlighted in blue and the corresponding fit of IðqÞ is plotted in Fig. 4(a). Fig. 5 shows the results for the KA. As plotted in Fig. 5(c), by increasing the iterations of the KA the total error 2 tends to decrease until approaching 2 ' 3, similar to the SVD. The correlation function obtained after k ¼ 100 iteration steps is plotted in green in Fig. 5(b) and the corresponding fit is shown in Fig. 5(a). Fig. 6(a) shows the correlation functions determined by the IFT, the SVD and the KA. All three curves are basically identical. However, when D max is not determined by the IFT but randomly chosen, this is not the case anymore. Fig. 6(b) shows as an example what happens when D max is fixed to 50 nm. The correlation functions determined by the SVD and KA are basically the same as before, whereas the IFT results in a completely different one. This inability to automatically determine the appropriate maximum accessible sizes for the system and the need for a sophisticated guess by an informed user are significant issues for most of the common available tools to estimate PðrÞ.

Results of the model-free data analysis
To better understand the physical meaning of PðrÞ, we will now analyze the field-dependent data. Fig. 7(a) shows the sector averages at 3 and 0 T [as shown in Fig. 2(b)], as well as the difference between the two. The sectors are parallel to the applied field and thus the scattering intensity IðqÞ at 3 T is dominated by the nuclear scattering intensity as the sample is nearly completely magnetically saturated at this field [see Fig. 1(b)]. Therefore, the correlation functions derived from IðqÞ are essentially the autocorrelation function of the nuclear scattering profile, and thus the oscillations in PðrÞ shown in Fig. 7(b) can be attributed to the nuclear structure factor (Weyerich et al., 1999). Negative values of PðrÞ are associated with distances that connect particle volumes with a scattering length density below the average. The difference between the scattering intensities measured at zero field and 3 T, on the other hand, is of purely magnetic origin (      This demonstrates that the nuclear and magnetic structure factors are not the same (Honecker et al., 2020). Furthermore, the magnetic correlation functions have no second positive peak in the range 17-22 nm, which indicates that magnetic order only exists between nearest neighbors. For larger distance, no correlation exists due to thermal fluctuations of the particle moments. Regarding the comparison of the three approaches for the determination of PðrÞ we reiterate that all three approaches result in very similar correlation functions [Figs. 7(b) and 7(c)].

Discussion and summary
Here, we have analyzed the magnetic-field-dependent SANS pattern of a powder sample of 10 nm iron oxide nanoparticles measured with the neutron resonant spin-echo spectrometer RESEDA. Our analysis of the 1D sector averages shows that the IFT, SVD and KA all result in identical correlation functions PðrÞ. IFT is the standard approach for such problems and well established. In comparison with the IFT, both SVD and KA are less sensitive to the size range chosen for the reconstruction of PðrÞ. This means that, for the IFT, the D max value has to be included as a fit parameter, but this is not the case for the SVD and KA, which also significantly reduces the computational costs. In general, an advantage of the SVD and KA is the faster computation times. While this is negligible when handling 1D data, it is a huge advantage for 2D data analysis as shown e.g. by Bender et al. (2019Bender et al. ( , 2021. Regarding an automated data analysis, the KA in particular has great potential as also discussed in the context of other measurement techniques (Karpavičius et al., 2021). This approach could also be applied when simultaneously analyzing data sets of complementary characterization techniques. Such a global fit could be pursued for dilute spherical nanoparticle systems, e.g. to determine the functional form of the size distribution or the magnetic volume without skewing the data to a given, potentially false, distribution (e.g. log-normal) form.
Regarding small-angle scattering data analysis, we recommend applying the SVD and KA approaches in addition to the IFT, as a consistent result with all three methods significantly strengthens the confidence in the obtained correlation functions. The corresponding Python scripts can be found at https://github.com/PBenderLux/Data-analysis and are free to use. Furthermore, the SVD and KA will be implemented in the open-source SasView software package to provide easy access for data analysis.